package aisLogic;

import java.util.Observable;

public class FrameRef extends Observable
{

	public static final int DX = 0;
	public static final int DY = 1;
	public static final int FRAME = 2;
	
	private int dx = 0;
	private int dy = 0;
	private Frame frame = null;
	

	public FrameRef()
	{
		super();
	}
	
	public FrameRef(Frame frame, int dx, int dy)
	{
		super();
		this.frame = frame;
		this.dx = dx;
		this.dy = dy;
	}

	public int getDx()
	{
		return dx;
	}

	public void setDx(int dx)
	{
		this.dx = dx;
		this.setChanged();
		this.notifyObservers(new Integer(DX));
	}

	public int getDy()
	{
		return dy;
	}

	public void setDy(int dy)
	{
		this.dy = dy;
		this.setChanged();
		this.notifyObservers(new Integer(DY));
	}

	public Frame getFrame()
	{
		return frame;
	}

	public void setFrame(Frame frame)
	{
		this.frame = frame;
		this.setChanged();
		this.notifyObservers(FRAME);
	}

}
